Feature/lab7#1224
Open
fleter wants to merge 3 commits into
Open
Conversation
Signed-off-by: Ilia Siaglov <ilya.syaglovv@gmail.com>
Signed-off-by: Ilia Siaglov <ilya.syaglovv@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goal
Add an Ansible playbook that deploys QuickNotes to the Lab 5 VirtualBox VM as a systemd service.
Changes
ansible/playbook.yaml— creates system user, copies static binary, renders systemd unit from Jinja2 template, enables and starts the service with handler-based restartsansible/inventory.initargeting the Vagrant VM via SSH on port 2222ansible/templates/quicknotes.service.j2— systemd unit with configurable env vars (ADDR,DATA_PATH,SEED_PATH)ansible/files/quicknotes— pre-built static Linux binary (CGO_ENABLED=0)submissions/lab7.mdcovering Tasks 1, 2, and Bonus with PLAY RECAPs, idempotency proof,--check --diffoutput, and design answersTesting
ansible-playbook -i ansible/inventory.ini ansible/playbook.yaml --check
ansible-playbook -i ansible/inventory.ini ansible/playbook.yaml
curl -s http://localhost:18080/health
ansible-playbook -i ansible/inventory.ini ansible/playbook.yaml # second run: changed=0
ansible-playbook -i ansible/inventory.ini ansible/playbook.yaml --check --diff
Checklist
submissions/lab7.mdupdatedansible/directory with playbook, inventory, template, binary